package com.sdu.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.sdu.model.Order;
import com.sdu.service.OrderService;

public class OrderServiceImpl implements OrderService {

	@Override
	public Order createOrder(String type) {

		System.out.println(type);

		Order order = new Order();
		order.setAddress("Beijing");
		order.setAmount(10);
		order.setPrice(10);
		order.setName("燕京啤酒");

		return order;
	}

	@Override
	public List<Order> getOrder() {
		List<Order> list = new ArrayList<>();
		Order o1 = new Order();
		o1.setAddress("Beijing");
		o1.setAmount(10);
		o1.setPrice(10);
		o1.setName("燕京啤酒");

		Order o2 = new Order();
		o2.setAddress("Jinan");
		o2.setAmount(5);
		o2.setPrice(5);
		o2.setName("油旋");

		list.add(o1);
		list.add(o2);

		return list;
	}

}
